package com.huangpeng.designmodel.strategy;

import java.util.HashMap;
import java.util.Map;

/**
 * @Author huangpeng
 * @Title 策略工厂
 * @Package
 * @Date 2020/10/21 11:09
 * @Description 策略工厂
 * @Version 1.0
 */
public class ReceiptHandleStrategyFactory {
    private static Map<String,IReceiptHandleStrategy> receiptHandleStrategyMap = new HashMap<String, IReceiptHandleStrategy>(){{
        put("MT2101",new Mt2101ReceiptHandleStrategy());
        put("MT1101",new Mt1101ReceiptHandleStrategy());
        put("MT8104",new Mt8104ReceiptHandleStrategy());
        put("MT9999",new Mt9999ReceiptHandleStrategy());
    }};

    public static IReceiptHandleStrategy getReceiptHandleStrategy(String receiptType){
        return receiptHandleStrategyMap.get(receiptType);
    }
}
